package com.woniu.dating.mapper;

import com.woniu.dating.pojo.DatingInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 玖柒
 * @since 2023-05-20
 */
public interface DatingInfoMapper extends BaseMapper<DatingInfo> {

    /**
     * 查询当前用户是否查看过该用户
     * @param userId
     * @param currentUserId
     * @return
     */
    @Select("select id, user_id, current_id from t_dating_info where user_id = #{userId} and current_id = #{currentUserId}")
    DatingInfo getDatingInfo(@Param("userId") Integer userId, @Param("currentUserId") Integer currentUserId);
}
